import React from 'react'
import "./conpon.css"
function Goods(props) {
    let { coupon, changeId } = props
    return (
        <div >
            <div>优惠券</div>
            <button onClick={() => changeId(0)}>优惠券1</button>
            <button onClick={() => changeId(1)}>优惠券2</button>
            <button onClick={() => changeId(2)}>优惠券3</button>
            
            <div className="clear home_coupon">
                {coupon.map((item) => (
                  <div className="home_coupon22" key={item.id}>{item.title}</div>
                ))}
            </div>

        </div>
    )
}
export default React.memo(Goods);